#!/bin/sh
#
# Copyright 2019, Data61
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
# ABN 41 687 119 230.
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(DATA61_BSD)
#

set -e

dataport_read /dev/uio0 4096
echo -ne "This is a test user string\n\0" | dataport_write /dev/uio0 4096
dataport_read /dev/uio0 4096
consumes_event_wait /dev/uio0 &
sleep 1
emits_event_emit /dev/uio0
wait
echo "Finished crossvm test script"
